/**
 * 
 */
package p3;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import p1.Person;
import p2.Student;

/**
 * @author Janis Daubergs
 *
 */
public class TestPerson extends Person {

    

    /**
     * @param args
     * @throws IOException 
     * @throws IllegalAccessException 
     * @throws InstantiationException 
     */
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, IOException {
              
     
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Person:");
        System.out.println("Enter person details. 1.line - Name, 2.line -Surname, 3.line - Personal code");
        Person janis = new Person(in.readLine(), in.readLine(), Integer.parseInt(in.readLine()));
        System.out.println("Student:");
        System.out.println("Enter student details. 1.line - Name, 2.line -Surname, 3.line - Personal code, 4.line - Apliecibas Id, 5.line - group Id");
        Student janis1 = new Student(in.readLine(), in.readLine(), Integer.parseInt(in.readLine()),Integer.parseInt(in.readLine()),in.readLine());
        System.out.print(janis);
        System.out.println();
        System.out.print(janis1);       
    }
}
